home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 17
/
Hot Mix 17.iso
/
HM17_SGI
/
research
/
examples
/
doc
/
sigprc07
< prev
next >
Wrap
Text File
|
1997-07-08
|
785b
|
22 lines
; This batch file creates a plot of the power spectrum of
; the simulated signal used in the example from Chapter 13,
; "Signal Processing", of _Using IDL_, after a Hamming window
; has been applied.
@sigprc01.bat ; compute time data sequence u
F = FINDGEN(N/2+1) / (N*delt) ; f = [0.0, 1.0/(N*delt), ... , 1.0/(2.0*delt)]
v_m = FFT(HANNING(N, ALPHA=0.54)*U)
; log-log plot of power spectrum
PLOT, F, ABS(v_m(0:N/2))^2, YTITLE='Power Spectrum', $
/YLOG, YRANGE=[1.0e-8,1.0], YSTYLE=1, YMARGIN=[4,4], $
XTITLE='Frequency in cycles / second', $
/XLOG, XRANGE=[1.0,1.0/(2.0*delt)], XSTYLE=1, $
TITLE='Power Spectrum of u(k) with Hamming Window ' $
+'!C(solid) and without Window (dashed)'
OPLOT, F, ABS((FFT(U))(0:N/2))^2, LINESTYLE=2 ; overplot without window